<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<title>OpenCV: samples/dnn/openpose.cpp</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon" />
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../tutorial-utils.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
   &#160;<span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">samples/dnn/openpose.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><span class="comment">//</span></div><div class="line"><span class="comment">//  this sample demonstrates the use of pretrained openpose networks with opencv&#39;s dnn module.</span></div><div class="line"><span class="comment">//</span></div><div class="line"><span class="comment">//  it can be used for body pose detection, using either the COCO model(18 parts):</span></div><div class="line"><span class="comment">//  http://posefs1.perception.cs.cmu.edu/OpenPose/models/pose/coco/pose_iter_440000.caffemodel</span></div><div class="line"><span class="comment">//  https://raw.githubusercontent.com/opencv/opencv_extra/master/testdata/dnn/openpose_pose_coco.prototxt</span></div><div class="line"><span class="comment">//</span></div><div class="line"><span class="comment">//  or the MPI model(16 parts):</span></div><div class="line"><span class="comment">//  http://posefs1.perception.cs.cmu.edu/OpenPose/models/pose/mpi/pose_iter_160000.caffemodel</span></div><div class="line"><span class="comment">//  https://raw.githubusercontent.com/opencv/opencv_extra/master/testdata/dnn/openpose_pose_mpi_faster_4_stages.prototxt</span></div><div class="line"><span class="comment">//</span></div><div class="line"><span class="comment">//  (to simplify this sample, the body models are restricted to a single person.)</span></div><div class="line"><span class="comment">//</span></div><div class="line"><span class="comment">//</span></div><div class="line"><span class="comment">//  you can also try the hand pose model:</span></div><div class="line"><span class="comment">//  http://posefs1.perception.cs.cmu.edu/OpenPose/models/hand/pose_iter_102000.caffemodel</span></div><div class="line"><span class="comment">//  https://raw.githubusercontent.com/CMU-Perceptual-Computing-Lab/openpose/master/models/hand/pose_deploy.prototxt</span></div><div class="line"><span class="comment">//</span></div><div class="line"></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="../../d9/d8c/dnn_8hpp.html">opencv2/dnn.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="../../d4/dd5/highgui_8hpp.html">opencv2/highgui.hpp</a>&gt;</span></div><div class="line"><span class="keyword">using namespace </span><a class="code" href="../../d2/d75/namespacecv.html">cv</a>;</div><div class="line"><span class="keyword">using namespace </span><a class="code" href="../../df/d57/namespacecv_1_1dnn.html">cv::dnn</a>;</div><div class="line"></div><div class="line"><span class="preprocessor">#include &lt;iostream&gt;</span></div><div class="line"><span class="keyword">using namespace </span><a class="code" href="../../d8/dcc/namespacestd.html">std</a>;</div><div class="line"></div><div class="line"></div><div class="line"><span class="comment">// connection table, in the format [model_id][pair_id][from/to]</span></div><div class="line"><span class="comment">// please look at the nice explanation at the bottom of:</span></div><div class="line"><span class="comment">// https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/output.md</span></div><div class="line"><span class="comment">//</span></div><div class="line"><span class="keyword">const</span> <span class="keywordtype">int</span> POSE_PAIRS[3][20][2] = {</div><div class="line">{   <span class="comment">// COCO body</span></div><div class="line">    {1,2}, {1,5}, {2,3},</div><div class="line">    {3,4}, {5,6}, {6,7},</div><div class="line">    {1,8}, {8,9}, {9,10},</div><div class="line">    {1,11}, {11,12}, {12,13},</div><div class="line">    {1,0}, {0,14},</div><div class="line">    {14,16}, {0,15}, {15,17}</div><div class="line">},</div><div class="line">{   <span class="comment">// MPI body</span></div><div class="line">    {0,1}, {1,2}, {2,3},</div><div class="line">    {3,4}, {1,5}, {5,6},</div><div class="line">    {6,7}, {1,14}, {14,8}, {8,9},</div><div class="line">    {9,10}, {14,11}, {11,12}, {12,13}</div><div class="line">},</div><div class="line">{   <span class="comment">// hand</span></div><div class="line">    {0,1}, {1,2}, {2,3}, {3,4},         <span class="comment">// thumb</span></div><div class="line">    {0,5}, {5,6}, {6,7}, {7,8},         <span class="comment">// pinkie</span></div><div class="line">    {0,9}, {9,10}, {10,11}, {11,12},    <span class="comment">// middle</span></div><div class="line">    {0,13}, {13,14}, {14,15}, {15,16},  <span class="comment">// ring</span></div><div class="line">    {0,17}, {17,18}, {18,19}, {19,20}   <span class="comment">// small</span></div><div class="line">}};</div><div class="line"></div><div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)</div><div class="line">{</div><div class="line">    <a name="_a0"></a><a class="code" href="../../d0/d2e/classcv_1_1CommandLineParser.html">CommandLineParser</a> parser(argc, argv,</div><div class="line">        <span class="stringliteral">&quot;{ h help           | false     | print this help message }&quot;</span></div><div class="line">        <span class="stringliteral">&quot;{ p proto          |           | (required) model configuration, e.g. hand/pose.prototxt }&quot;</span></div><div class="line">        <span class="stringliteral">&quot;{ m model          |           | (required) model weights, e.g. hand/pose_iter_102000.caffemodel }&quot;</span></div><div class="line">        <span class="stringliteral">&quot;{ i image          |           | (required) path to image file (containing a single person, or hand) }&quot;</span></div><div class="line">        <span class="stringliteral">&quot;{ d dataset        |           | specify what kind of model was trained. It could be (COCO, MPI, HAND) depends on dataset. }&quot;</span></div><div class="line">        <span class="stringliteral">&quot;{ width            |  368      | Preprocess input image by resizing to a specific width. }&quot;</span></div><div class="line">        <span class="stringliteral">&quot;{ height           |  368      | Preprocess input image by resizing to a specific height. }&quot;</span></div><div class="line">        <span class="stringliteral">&quot;{ t threshold      |  0.1      | threshold or confidence value for the heatmap }&quot;</span></div><div class="line">        <span class="stringliteral">&quot;{ s scale          |  0.003922 | scale for blob }&quot;</span></div><div class="line">    );</div><div class="line"></div><div class="line">    <a class="code" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> modelTxt = <a name="a1"></a><a class="code" href="../../d6/dba/group__core__utils__samples.html#ga3a33b00033b46c698ff6340d95569c13">samples::findFile</a>(parser.<a name="a2"></a><a class="code" href="../../d0/d2e/classcv_1_1CommandLineParser.html#a190215863579a6d244dccfd261ee0224">get</a>&lt;<span class="keywordtype">string</span>&gt;(<span class="stringliteral">&quot;proto&quot;</span>));</div><div class="line">    <a class="code" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> modelBin = <a class="code" href="../../d6/dba/group__core__utils__samples.html#ga3a33b00033b46c698ff6340d95569c13">samples::findFile</a>(parser.<a class="code" href="../../d0/d2e/classcv_1_1CommandLineParser.html#a190215863579a6d244dccfd261ee0224">get</a>&lt;<span class="keywordtype">string</span>&gt;(<span class="stringliteral">&quot;model&quot;</span>));</div><div class="line">    <a class="code" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> imageFile = <a class="code" href="../../d6/dba/group__core__utils__samples.html#ga3a33b00033b46c698ff6340d95569c13">samples::findFile</a>(parser.<a class="code" href="../../d0/d2e/classcv_1_1CommandLineParser.html#a190215863579a6d244dccfd261ee0224">get</a>&lt;<a class="code" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>&gt;(<span class="stringliteral">&quot;image&quot;</span>));</div><div class="line">    <a class="code" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> dataset = parser.<a class="code" href="../../d0/d2e/classcv_1_1CommandLineParser.html#a190215863579a6d244dccfd261ee0224">get</a>&lt;<a class="code" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>&gt;(<span class="stringliteral">&quot;dataset&quot;</span>);</div><div class="line">    <span class="keywordtype">int</span> W_in = parser.<a class="code" href="../../d0/d2e/classcv_1_1CommandLineParser.html#a190215863579a6d244dccfd261ee0224">get</a>&lt;<span class="keywordtype">int</span>&gt;(<span class="stringliteral">&quot;width&quot;</span>);</div><div class="line">    <span class="keywordtype">int</span> H_in = parser.<a class="code" href="../../d0/d2e/classcv_1_1CommandLineParser.html#a190215863579a6d244dccfd261ee0224">get</a>&lt;<span class="keywordtype">int</span>&gt;(<span class="stringliteral">&quot;height&quot;</span>);</div><div class="line">    <span class="keywordtype">float</span> thresh = parser.<a class="code" href="../../d0/d2e/classcv_1_1CommandLineParser.html#a190215863579a6d244dccfd261ee0224">get</a>&lt;<span class="keywordtype">float</span>&gt;(<span class="stringliteral">&quot;threshold&quot;</span>);</div><div class="line">    <span class="keywordtype">float</span> <a name="a3"></a><a class="code" href="../../d6/d84/namespacecv_1_1quality_1_1quality__utils.html#ae55d1c89ff5761730174745401162743">scale</a>  = parser.<a class="code" href="../../d0/d2e/classcv_1_1CommandLineParser.html#a190215863579a6d244dccfd261ee0224">get</a>&lt;<span class="keywordtype">float</span>&gt;(<span class="stringliteral">&quot;scale&quot;</span>);</div><div class="line"></div><div class="line">    <span class="keywordflow">if</span> (parser.<a class="code" href="../../d0/d2e/classcv_1_1CommandLineParser.html#a190215863579a6d244dccfd261ee0224">get</a>&lt;<span class="keywordtype">bool</span>&gt;(<span class="stringliteral">&quot;help&quot;</span>) || modelTxt.empty() || modelBin.empty() || imageFile.empty())</div><div class="line">    {</div><div class="line">        cout &lt;&lt; <span class="stringliteral">&quot;A sample app to demonstrate human or hand pose detection with a pretrained OpenPose dnn.&quot;</span> &lt;&lt; endl;</div><div class="line">        parser.<a name="a4"></a><a class="code" href="../../d0/d2e/classcv_1_1CommandLineParser.html#a84cda3794b765332bfe43bf8367222fb">printMessage</a>();</div><div class="line">        <span class="keywordflow">return</span> 0;</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="keywordtype">int</span> midx, npairs, nparts;</div><div class="line">         <span class="keywordflow">if</span> (!dataset.compare(<span class="stringliteral">&quot;COCO&quot;</span>)) {  midx = 0; npairs = 17; nparts = 18; }</div><div class="line">    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!dataset.compare(<span class="stringliteral">&quot;MPI&quot;</span>))  {  midx = 1; npairs = 14; nparts = 16; }</div><div class="line">    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!dataset.compare(<span class="stringliteral">&quot;HAND&quot;</span>)) {  midx = 2; npairs = 20; nparts = 22; }</div><div class="line">    <span class="keywordflow">else</span></div><div class="line">    {</div><div class="line">        std::cerr &lt;&lt; <span class="stringliteral">&quot;Can&#39;t interpret dataset parameter: &quot;</span> &lt;&lt; dataset &lt;&lt; std::endl;</div><div class="line">        exit(-1);</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="comment">// read the network model</span></div><div class="line">    <a name="_a5"></a><a class="code" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> net = <a name="a6"></a><a class="code" href="../../d6/d0f/group__dnn.html#ga3b34fe7a29494a6a4295c169a7d32422">readNet</a>(modelBin, modelTxt);</div><div class="line">    <span class="comment">// and the image</span></div><div class="line">    <a name="_a7"></a><a class="code" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> img = <a name="a8"></a><a class="code" href="../../d4/da8/group__imgcodecs.html#ga288b8b3da0892bd651fce07b3bbd3a56">imread</a>(imageFile);</div><div class="line">    <span class="keywordflow">if</span> (img.<a name="a9"></a><a class="code" href="../../d3/d63/classcv_1_1Mat.html#abbec3525a852e77998aba034813fded4">empty</a>())</div><div class="line">    {</div><div class="line">        std::cerr &lt;&lt; <span class="stringliteral">&quot;Can&#39;t read image from the file: &quot;</span> &lt;&lt; imageFile &lt;&lt; std::endl;</div><div class="line">        exit(-1);</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="comment">// send it through the network</span></div><div class="line">    <a class="code" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> inputBlob = <a name="a10"></a><a class="code" href="../../d6/d0f/group__dnn.html#ga29f34df9376379a603acd8df581ac8d7">blobFromImage</a>(img, scale, <a name="a11"></a><a class="code" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>(W_in, H_in), <a name="a12"></a><a class="code" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a>(0, 0, 0), <span class="keyword">false</span>, <span class="keyword">false</span>);</div><div class="line">    net.<a name="a13"></a><a class="code" href="../../db/d30/classcv_1_1dnn_1_1Net.html#a5e74adacffd6aa53d56046581de7fcbd">setInput</a>(inputBlob);</div><div class="line">    <a class="code" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> result = net.<a name="a14"></a><a class="code" href="../../db/d30/classcv_1_1dnn_1_1Net.html#a98ed94cb6ef7063d3697259566da310b">forward</a>();</div><div class="line">    <span class="comment">// the result is an array of &quot;heatmaps&quot;, the probability of a body part being in location x,y</span></div><div class="line"></div><div class="line">    <span class="keywordtype">int</span> H = result.<a name="a15"></a><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a146f8e8dda07d1365a575ab83d9828d1">size</a>[2];</div><div class="line">    <span class="keywordtype">int</span> W = result.<a class="code" href="../../d3/d63/classcv_1_1Mat.html#a146f8e8dda07d1365a575ab83d9828d1">size</a>[3];</div><div class="line"></div><div class="line">    <span class="comment">// find the position of the body parts</span></div><div class="line">    vector&lt;Point&gt; points(22);</div><div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> n=0; n&lt;nparts; n++)</div><div class="line">    {</div><div class="line">        <span class="comment">// Slice heatmap of corresponding body&#39;s part.</span></div><div class="line">        <a class="code" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> heatMap(H, W, <a name="a16"></a><a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga4a3def5d72b74bed31f5f8ab7676099c">CV_32F</a>, result.<a name="a17"></a><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a13acd320291229615ef15f96ff1ff738">ptr</a>(0,n));</div><div class="line">        <span class="comment">// 1 maximum per heatmap</span></div><div class="line">        <a name="_a18"></a><a class="code" href="../../db/d4e/classcv_1_1Point__.html">Point</a> p(-1,-1),pm;</div><div class="line">        <span class="keywordtype">double</span> conf;</div><div class="line">        <a name="a19"></a><a class="code" href="../../d2/de8/group__core__array.html#gab473bf2eb6d14ff97e89b355dac20707">minMaxLoc</a>(heatMap, 0, &amp;conf, 0, &amp;pm);</div><div class="line">        <span class="keywordflow">if</span> (conf &gt; thresh)</div><div class="line">            p = pm;</div><div class="line">        points[n] = p;</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="comment">// connect body parts and draw it !</span></div><div class="line">    <span class="keywordtype">float</span> SX = float(img.<a name="a20"></a><a class="code" href="../../d3/d63/classcv_1_1Mat.html#aa3e5a47585c9ef6a0842556739155e3e">cols</a>) / W;</div><div class="line">    <span class="keywordtype">float</span> SY = float(img.<a name="a21"></a><a class="code" href="../../d3/d63/classcv_1_1Mat.html#abed816466c45234254d25bc59c31245e">rows</a>) / H;</div><div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> n=0; n&lt;npairs; n++)</div><div class="line">    {</div><div class="line">        <span class="comment">// lookup 2 connected body/hand parts</span></div><div class="line">        <a name="_a22"></a><a class="code" href="../../db/d4e/classcv_1_1Point__.html">Point2f</a> a = points[POSE_PAIRS[midx][n][0]];</div><div class="line">        <a class="code" href="../../db/d4e/classcv_1_1Point__.html">Point2f</a> b = points[POSE_PAIRS[midx][n][1]];</div><div class="line"></div><div class="line">        <span class="comment">// we did not find enough confidence before</span></div><div class="line">        <span class="keywordflow">if</span> (a.<a name="a23"></a><a class="code" href="../../db/d4e/classcv_1_1Point__.html#a4c96fa7bdbfe390be5ed356edb274ff3">x</a>&lt;=0 || a.<a name="a24"></a><a class="code" href="../../db/d4e/classcv_1_1Point__.html#a157337197338ff199e5df1a393022f15">y</a>&lt;=0 || b.<a class="code" href="../../db/d4e/classcv_1_1Point__.html#a4c96fa7bdbfe390be5ed356edb274ff3">x</a>&lt;=0 || b.<a class="code" href="../../db/d4e/classcv_1_1Point__.html#a157337197338ff199e5df1a393022f15">y</a>&lt;=0)</div><div class="line">            <span class="keywordflow">continue</span>;</div><div class="line"></div><div class="line">        <span class="comment">// scale to image size</span></div><div class="line">        a.<a class="code" href="../../db/d4e/classcv_1_1Point__.html#a4c96fa7bdbfe390be5ed356edb274ff3">x</a>*=SX; a.<a class="code" href="../../db/d4e/classcv_1_1Point__.html#a157337197338ff199e5df1a393022f15">y</a>*=SY;</div><div class="line">        b.<a class="code" href="../../db/d4e/classcv_1_1Point__.html#a4c96fa7bdbfe390be5ed356edb274ff3">x</a>*=SX; b.<a class="code" href="../../db/d4e/classcv_1_1Point__.html#a157337197338ff199e5df1a393022f15">y</a>*=SY;</div><div class="line"></div><div class="line">        <a name="a25"></a><a class="code" href="../../d6/d6e/group__imgproc__draw.html#ga7078a9fae8c7e7d13d24dac2520ae4a2">line</a>(img, a, b, <a class="code" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a>(0,200,0), 2);</div><div class="line">        <a name="a26"></a><a class="code" href="../../d6/d6e/group__imgproc__draw.html#gaf10604b069374903dbd0f0488cb43670">circle</a>(img, a, 3, <a class="code" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a>(0,0,200), -1);</div><div class="line">        <a class="code" href="../../d6/d6e/group__imgproc__draw.html#gaf10604b069374903dbd0f0488cb43670">circle</a>(img, b, 3, <a class="code" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a>(0,0,200), -1);</div><div class="line">    }</div><div class="line"></div><div class="line">    <a name="a27"></a><a class="code" href="../../d7/dfc/group__highgui.html#ga453d42fe4cb60e5723281a89973ee563">imshow</a>(<span class="stringliteral">&quot;OpenPose&quot;</span>, img);</div><div class="line">    <a name="a28"></a><a class="code" href="../../d7/dfc/group__highgui.html#ga5628525ad33f52eab17feebcfba38bd7">waitKey</a>();</div><div class="line"></div><div class="line">    <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --> </div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:29 for OpenCV by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
